<?php

namespace Hilaoyu\LaravelExtend\Services\AccessControl;

use Hilaoyu\LaravelExtend\Entity;
use Hilaoyu\Utils\UtilHtml;

abstract class AbstractEntityAccessControlRoles extends Entity
{

    protected function alterDeleteBeforeTrans($model,$force=false)
    {
        if($model->required){
            $this->setError('此项为系统必须，不可删除');
            return null;
        }
        $model =  parent::alterDeleteBeforeTrans($model,$force);
        return $model;
    }

}
